import request from '@/utils/request'

// 查询店铺地址列表
export function listAddress(query) {
  return request({
    url: '/prod-api/platform/address/list',
    method: 'get',
    params: query
  })
}

// 查询店铺地址详细
export function getAddress(platformAddressUid) {
  return request({
    url: '/prod-api/platform/address/' + platformAddressUid,
    method: 'get'
  })
}

// 新增店铺地址
export function addAddress(data) {
  return request({
    url: '/prod-api/platform/address',
    method: 'post',
    data: data
  })
}

export function updateDataStatus(platformAddressUid,dataStatus){
  let data ={platformAddressUid:platformAddressUid,dataStatus:dataStatus};
  return request({
    url: '/prod-api/platform/address',
    method: 'put',
    data: data
  })
}

// 修改店铺地址
export function updateAddress(data) {
  return request({
    url: '/prod-api/platform/address',
    method: 'put',
    data: data
  })
}

// 删除店铺地址
export function delAddress(platformAddressUid) {
  return request({
    url: '/prod-api/platform/address/' + platformAddressUid,
    method: 'delete'
  })
}
